#pragma once
#include "inc.h"
#define MAX_VERTEX 10
class GCamera;
class GModel;
class GWindow;

struct light
{
	Vector3f pos;
	Vector3f intensity;
};

class VertexProp
{
public:
	Vector4f vertex_pos;
	Vector2f uv;
	Vector3f normal;
	Vector4f clip_pos;
	Vector4f world_pos;
};

class Payload
{
public:
	Matrix4f mvp_matrix;
	Matrix4f viewport_matrx;
	Matrix4f model_matrix;

	VertexProp in_vertexProp[MAX_VERTEX];
	VertexProp out_vertexProp[MAX_VERTEX];

	GWindow* pWindow;
	GModel* pModel;
	GCamera* pCamera;

	int triangle_index[3];
	VertexProp* GetOutVertexProp(int nVertexIndex);
	VertexProp* GetInVertexProp(int nVertexIndex);
};

class GShader
{
public:
	virtual void vertex_shader(VertexProp* vertex, Payload& payload) = 0;
	virtual Eigen::Vector3f fragment_shader(VertexProp* vertex, Payload& payload) = 0;
};